﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace AGrandVenture
{
    public class TextZoom
    {
        public string Text;
        public Color DrawColour;
        private int displayCounter;
        private int maxDisplayCount = 30;
        private float scale = 0.2f;
        private float lastScaleAmount = 0.0f;
        private float scaleAmount = 0.1f;
        public Vector2 location = Vector2.Zero;

        public float Scale
        {
            get { return scaleAmount * displayCounter; }
        }

        public bool IsCompleted
        {
            get { return (displayCounter > maxDisplayCount); }
        }

        public TextZoom(string displayText, Color fontColour, Vector2 location)
        {
            Text = displayText;
            DrawColour = fontColour;
            displayCounter = 0;
            this.location = location;
        }

        public void Update()
        {
            scale += lastScaleAmount + scaleAmount;
            lastScaleAmount += scaleAmount;
            displayCounter++;
        }

    }
}
